// 环境配置
const env = import.meta.env.MODE || 'development';

const config = {
  development: {
    POCKETBASE_URL: 'http://172.27.235.239:7070',
    API_BASE_URL: 'http://172.27.235.239:7070/api',
  },
  production: {
    POCKETBASE_URL: 'http://xiong.plus:7070', // 请替换为实际的生产环境域名
    API_BASE_URL: 'http://xiong.plus:7070/api',
  },
  test: {
    POCKETBASE_URL: 'http://localhost:8090',
    API_BASE_URL: 'http://localhost:8090/api',
  }
};

// 获取当前环境的配置
export const getConfig = () => {
  return config[env] || config.development;
};

// 导出常用配置项
export const POCKETBASE_URL = getConfig().POCKETBASE_URL;
export const API_BASE_URL = getConfig().API_BASE_URL;

// 导出环境信息
export const isDevelopment = env === 'development';
export const isProduction = env === 'production';
export const isTest = env === 'test';

console.log('当前环境:', env);
console.log('PocketBase URL:', POCKETBASE_URL); 